#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main(int argc, char *argv[]) {
    int n, tmp;
    int k = 0;

    scanf("%d", &n);
    tmp = n;//把n存到tmp

    while (n)
    {
        n /= 10;
        k++;
    }
    printf("%d ", k);

    // scanf("%d", &n);
    n = tmp;
    int b = 0;
    while(n != 0) {
        b += n % 10;
        n /= 10; 
    }
    printf("%d", b);

    return 0;
}  